import request from "@/utils/request";

// 资源池数据列表 加/draw
export function getData00(data) {
  return request({
    url: "/trade/customer/customer/draw/list",
    method: "get",
    params: data
  });
}
// 查询详情
export function getInfo (id) {
  return request({
    url: `/trade/customer/customer/${id}`,
    method: "get"
  })
}

// 资源池添加资源
export function submitAptitudeForm(data) {
  return request({
    url: "/trade/customer/customer/soure/insert",
    method: "post",
    data: data
  });
}
// 资源池修改资源
export function update(data) {
  return request({
    url: "/trade/customer/customer",
    method: "put",
    data: data
  });
}
// 资源池删除数据
export function deleteData(ids) {
  return request({
    url: `/trade/customer/customer/${ids}`,
    method: "delete"
  });
}

// 资源下发
export function appleSubmitForm (data) {
  return request({
    url: "/trade/customer/customer/resources/issued",
    method: "post",
    data: data
  })
}
// 资源领取
export function receiveData (id) {
  return request({
    url: `/trade/customer/customer/draw/${id}`,
    method: "get"
  })
}

// 客户等级查询
export function queryLevel(data) {
  return request({
    url: "/trade/customer/grade/list",
    method: "get",
    params: data
  });
}

// 转移审批列表
export function queryApproval (data) {
  return request({
    url: "/trade/customer/record/list",
    method: "get",
    params: data
  })
}
export function checkData (data) {
  return request({
    url: "/trade/customer/record/approval",
    method: "get",
    params: data
  })
}

// 下载模板
export function downloadTemplate (data) {
  return request({
    url: "/trade/customer/customer/importTemplate",
    method: "get",
    params: data
  })
}
// 资源导入
export function uploadFile(state,label,data) {
  return request({
    url: '/trade/customer/customer/batchImport?state='+state+'&label='+label,
    method: 'post',
    data: data
  })
}
export function uploadFile2(state,label,data) {
  return request({
    url: '/trade/customer/customer/domestic/batchImport?state='+state+'&label='+label,
    method: 'post',
    data: data
  })
}
// 获取标签
export function getLabels (data) {
  return request({
    url: '/trade/customer/lablemanager/list',
    method: 'get',
    params: data
  })
}

// 获取国家列表
export function getCountryList() {
  return request({
    url: 'system/country/list',
    method: 'get',
  })
}
